org.neo4j.helpers.collection
Class MapUtil

java.lang.Object
  extended by org.neo4j.helpers.collection.MapUtil

public abstract class MapUtil
extends Object

Utility to create Maps.


Constructor Summary
MapUtil()
           
 
Method Summary
static
<K,V> Map<K,V>
genericMap(Object... objects)
          A short-hand method for creating a Map of key/value pairs.
static Map<String,Object> map(Object... objects)
          A short-hand method for creating a Map of key/value pairs where keys are Strings and values are Objects.
static Map<String,String> stringMap(String... strings)
          A short-hand method for creating a Map of key/value pairs where both keys and values are Strings.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapUtil

public MapUtil()
Method Detail

genericMap

public static <K,V> Map<K,V> genericMap(Object... objects)
A short-hand method for creating a Map of key/value pairs.

Parameters:
objects - alternating key and value.
Returns:
a Map with the entries supplied by objects.

stringMap

public static Map<String,String> stringMap(String... strings)
A short-hand method for creating a Map of key/value pairs where both keys and values are Strings.

Parameters:
string - alternating key and value.
Returns:
a Map with the entries supplied by strings.

map

public static Map<String,Object> map(Object... objects)
A short-hand method for creating a Map of key/value pairs where keys are Strings and values are Objects.

Parameters:
objects - alternating key and value.
Returns:
a Map with the entries supplied by objects.


Copyright © 2010 Neo4j. All Rights Reserved.